<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script type="text/javascript">
			document.write('<script src="../../js/fix.js?rd=?rd=' + Math.random() + '"><\/script>');
		</script>
		<script type="text/javascript">
			link(['../../css/reset.css']);
		</script>
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">关于APP</h1>
		</header>
		<div class="mui-content mui-scroll-wrapper scroll">
			<div class="mui-scroll">
				<br />
				<div class="mui-text-center lh30">
					<span class="fs16" id="appname">卡游精灵</span><br />
					<span class="cor-999">当前版本<span id="version">0</span></span><br />
					<img class="loadthumb" data-wh="120,120" id="qrcodeimg"><br/>
					<span class="cor-999">扫描二维码，让您的朋友下载更快捷！</span>
				</div>
				<br />
				<ul class="mui-table-view tblv-nl" id="gostore" style="display: none;">
					<li class="mui-table-view-cell">
						<a id="rate" class="mui-navigate-right">去评分</a>
					</li>
				</ul>

				<div class="bg-fff lh20 mt15 p1rem">
					<p>说明：</p>
					<p id="desc">
					</p>
				</div>
				<p class="mui-text-center lh30 mt15 mb5">甲壳虫动漫股份有限公司版权所有<br/>Copyright©2017-<span id="lastyear"></span> Kayou Inc. All Rights Reserved</p>
			</div>
		</div>
		<script type="text/javascript">
			script();
		</script>
		<script type="text/javascript">
			mui.init();
			mui.plusReady(function() {
				if(mui.os.android) {
					document.getElementById("gostore").style.display = "none";
				} else {
					document.getElementById("gostore").setAttribute("style", "");
				}
				storage.init();
				baseStorage.log();
				document.getElementById("version").innerText = storageUser.Version;
				var iosurl, androidurl, appid;
				document.getElementById("lastyear").innerText = ((new Date().getFullYear() + 1).toString());
				request("/Base/getAPPInfo", {}, function(json) {
					if(json.code == 0) {
						var data = json.data;
						document.getElementById("appname").innerText = data.AppName;

						document.getElementById("qrcodeimg").setAttribute("data-url", data.QrCodeUrl);
						document.getElementById("desc").innerText = data.Description;
						iosurl = data.IosUrl;
						androidurl = data.AndriodUrl;
						appid = data.AppPackageId;
						log(data);
					} else {
						mui.toast(json.msg);
					}
				});

				//去评分
				document.getElementById("rate").addEventListener('tap', function() {
					if(mui.os.ios) {
						location.href = iosurl;
					}
					//					else if(mui.os.android) {
					//						plus.runtime.openURL("market://details?id=" + appid, function(e) {
					//							plus.runtime.openURL("market://details?id=" + appid, function(e) {
					//								mui.alert("360手机助手和应用宝，你一个都没装，暂时无法评分，感谢支持");
					//							}, "com.qihoo.appstore");
					//						}, "com.tencent.android.qqdownloader");
					//					}
				});
			});
		</script>
	</body>

</html>